<template>
  <div>
    <h3>文章标题：{{title}}</h3>
    <button @click="onClick">触发事件，更新父组件标题</button>
  </div>
</template>

<script>
export default {
  props: ["title"],
  methods: {
    onClick() {
      this.$emit("update:title", "新标题");
    }
  }
};
</script>